home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
5
/
chrpro3.zip
/
CPROPRTY.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-01-21
|
11KB
|
337 lines
* Program CPROPRTY - Controls all Church Property Management Functions
Set talk off
Set bell off
Clear
Set deleted on
Set intensity off
Set exact off
? 'Now loading the CPROPRTY program.'
Select secondary
Use BDIRFILE index BDIRFILE
Store 'January February March April May June ' to MONTHS
Store MONTHS+'July August SeptemberOctober November December ' to MONTHS
If $(DATE(),7,2) = '00'
Set date to 01,01,00
ENDIF
Store ' ' to curmonthx
Store ' ' to curyear
Store ' ' to curmonth
* Set today's date from current system-date
Store $(date(),1,2) to curmo
Store $(date(),7,2) to curmonthx
Store val(curmo) to nmonth
Store curmo+curmonthx to indate
Store VAL(curmonthx) to CURYEAR
If $(date(),4,1) = '0'
Store $(DATE(),5,1) to CURMONTHX
else
Store $(DATE(),4,2) to CURMONTHX
endif
Store trim($(months,NMONTH*9-8,9)) to curmonth
Store curmonth+' '+curmonthx to curmonthx
Store ', 19'+$(DATE(),7,2) to CURYEAR
GOTO 1
Store trim($(SPACT,4,27)) to CHNAME
SKIP
Store $(SPACT,21,1) to D
USE
Select primary
Store curmonthx+curyear to curdate
Release months,curmonthx,curmonth,indate,nmonth,curmo,curyear
Store d+':CPROPRTY' to MFILE
Store T to LEVEL2
Do while LEVEL2
Save to FMEMVARS
Erase
@ 0,1 say chname
@ 0,60 say curdate
@ 1,1 say 'DATA DISK = '+D
@ 2,21 say 'CHURCH PROPERTY MANAGER 3-/CPROPRTY/'
@ 4,9 say '1) Add/edit church property items /CPRUPDAT/'
@ 5,9 say '2) Property full report '
@ 6,9 say '3) Property financial summary - by item type'
@ 7,9 say '4) Property checked out '
@ 8,9 say '5) Property due for service '
@ 9,9 say '6) Property short reports '
@ 10,15 say '6A) by item name'
@ 11,15 say '6B) by item type'
@ 12,15 say '6C) by "used by"'
@ 13,15 say '6D) by location'
@ 14,15 say '6E) by "received by"'
@ 15,9 say '7) Start a new CPROPRTY file'
@ 16,9 say '8) Re-index the CPROPRTY file'
@ 17,9 say '9) Change the Names Directory (BDIRFILE)'
?
Accept ' Select one of the above operations ("Q" = quit) ' to MSEL
?
If !(MSEL)='DISK='
Store !($(MSEL,6,1)) to D
? 'Disk now being set to drive',D
Save to FMEMVARS
else
Store F to validd1
Store F to sreport
Do while .NOT. validd1
Store T to validd1
Do CASE
CASE MSEL = '1'
Do CPRUPDAT.CMD
CASE MSEL = '2'
Store 99 to curline
Store D+':CPROPRTY' to mfile
? 'Now printing the Full-Information report.'
Use &MFILE index &MFILE
Set format to print
Store 0 to pag
Do while .not. EOF
If curline>60
If curline<>99
EJECT
endif
Store pag+1 to pag
@ 2,1 say curdate
@ 2,20 say 'Church Property Report, full-information Page'+str(pag,4)
Store 5 to curline
endif
@ curline,0 say iname+' TYPE:'+itype+' LOCAT:'+ilocation+'USER:'+USED:BY
@ curline+1,5 say 'SERVICE:' get servdate
@ curline+1,21 say 'COST: $'+str(icost,8,2)+' RECVD:'+recvd:by+indate+;
' BRAND:'+$(ibrand,1,8)
@ curline+2,0 say '#'+str(#,4)+' STATUS:'+status+' VALUE: $'+;
str(ivalue,10,2)+' OUT:'+chkd:out
STORE CURLINE+4 TO CURLINE
SKIP
ENDDO
eject
Set format to screen
?
Accept 'End of report. Press <retn>' to xx
CASE MSEL='3'
Use &MFILE
Accept 'Enter a group code, or press <RETN> for all groups ' to xx
If !(XX)<>'Q'
Store d+':cprstat' to nfile
? 'Now indexing the CPROPRTY file by STATUS field (group code).'
Set talk on
Index on $(status,1,1)+iname to &NFILE
Set talk off
Use &MFILE index &NFILE
Set format to print
Store 99 to cl
Store 0 to pagenum
Store T to valid2
Store ' ' to xhdr
If xx<>' '
Find &XX
If #=0
? 'This group code not found in the CPROPRTY file. '
Store F to valid2
endif
Store ', Group - '+$(status,1,1) to xhdr
endif
Store ' Property Financial Report'+xhdr to hdr
If valid2
Store 0 to pagenum
Store 99 to CL
Store 0.00 to xvalue
Do while .not. EOF
If cl>60
If cl<>99
EJECT
endif
Store pagenum+1 to pagenum
@ 1,1 say curdate+' '+hdr+' Page'+str(pagenum,4)
@ 4,1 say 'RECORD LOCATION ITEM ITEM '
@ 4,55 say 'CURRENT ORIGINAL'
@ 5,1 say 'NUMBER TYPE NAME '
@ 5,55 say ' VALUE VALUE '
Store 7 to cl
endif
@ cl,0 say $(status,1,1)+str(#,5)+' '+$(ilocation,1,15)+$(itype,1,10)
@ cl,35 say $(iname,1,16)+' $'+str(ivalue,10,2)+' $'+str(icost,10,2)
Store CL+1 to CL
Store xvalue+ivalue to xvalue
SKIP
enddo
@ cl,1 say ;
'-----------------------------------------------------------------------------'
@ cl+1,38 say 'TOTAL VALUE = $'+str(xvalue,10,2)
EJECT
endif
Set format to screen
Accept 'Report is complete. Press <return>' to xx
CASE MSEL='4'
Store ' - Property Checked Out' to tname
Store 'chkd:out<>" "' to bname
Store T to sreport
Use &MFILE index &MFILE
CASE MSEL='5'
Store ' - Property Due for Service' to tname
Store $(date(),7,2)+$(date(),1,2)+$(date(),4,2) to bnamex
Store "SERVDATE<bnamex.and. servdate<>' '" to bname
Store T to sreport
USE &MFILE index &MFILE
CASE !(MSEL)='6A'.or.!(MSEL)='6B'.or.!(MSEL)='6C'.or.!(MSEL)='6D'.or.;
!(MSEL)='6E'
Store T to sreport
Do CASE
CASE !(MSEL)='6A'
Store ' - by Item Name' to tname
Use &MFILE index &MFILE
Store 'sreport' to bname
Accept 'Enter a particular name (<retn> = ALL) ' to XX
If xx<>' '
Store 'iname=XX' to bname
endif
CASE !(MSEL)='6B'
Use &MFILE
Store d+':xfile' to NFILE
? 'Now indexing by property type.'
Set talk on
Index on itype to &NFILE
Set talk off
Use &MFILE index &NFILE
Store ' - by Item Type' to tname
Store 'sreport' to bname
Accept 'Enter a particular "type" name (<retn> = ALL) ' to XX
If xx<>' '
Store 'itype=XX' to bname
Find &XX
If #=0
Accept 'This type name is not found. Press <retn>' to xx
Store F to sreport
endif
endif
CASE !(MSEL)='6C'
Use &MFILE
Store d+':xfile' to NFILE
? 'Now indexing by property "used by".'
Set talk on
Index on used:by to &NFILE
Set talk off
Use &MFILE index &NFILE
Store 'sreport' to bname
Store ' - by item Used-By' to tname
Accept 'Enter a particular "used by" name (<retn> = ALL) ' to XX
If xx<>' '
Store 'used:by=XX' to bname
Find &XX
If #=0
Accept 'This "used by" name is not found. Press <retn>' to xx
Store F to sreport
endif
endif
CASE !(MSEL)='6D'
Use &MFILE
Store d+':xfile' to NFILE
? 'Now indexing by property location.'
Set talk on
Index on ilocation to &NFILE
Set talk off
Use &MFILE index &NFILE
Store 'sreport' to bname
Store ' - by item Location' to tname
Accept 'Enter a particular name (<retn> = ALL) ' to XX
If xx<>' '
Store 'ilocation=XX' to bname
Find &XX
If #=0
Accept 'This type name is not found. Press <retn>' to xx
Store F to sreport
endif
endif
CASE !(MSEL)='6E'
Use &MFILE
Store d+':xfile' to NFILE
? 'Now indexing by property "received by".'
Set talk on
Index on recvd:by to &NFILE
Set talk off
Use &MFILE index &NFILE
Store ' - by Item "Received by"' to tname
Store 'sreport' to bname
Accept 'Enter a particular name (<retn> = ALL) ' to XX
If xx<>' '
Store 'recvd:by=XX' to bname
Find &XX
If #=0
Accept 'This "received by" name is not found. Press <retn>' to xx
Store F to sreport
endif
endif
endcase
CASE MSEL = '7' .or. MSEL='8'
If msel='7'
? 'Now creating a new CPROPRTY file.'
Use CPROPRTX
Copy to &MFILE
else
? 'Now re-indexing the CPROPRTY file.'
endif
USE &MFILE
Index on iname to &MFILE
Store d+':CPRLOCAT' to MFILE1
Index on ilocation to &MFILE1
Use
Accept 'CPROPRTY file is now complete. Press <retn>' to xx
CASE MSEL='9'
Select secondary
Use BDIRFILE index BDIRFILE
Store $(spact,4,27) to chname
SKIP
Store $(spact,21,1) to D
@ 19,8 say ' NAMES DIRECTORY EDITING '
Set intensity on
@ 21,12 say 'church ' get chname
@ 22,12 say 'data disk ' get D
READ
Set intensity off
? 'Now writing the above values into the Names Directory'
Replace spact with $(spact,1,20)+D
GOTO 1
Replace spact with $(spact,1,3)+chname
Use
Save to fmemvars
Select primary
CASE !(MSEL) = 'Q'
Store F to LEVEL2
RETURN
OTHERWISE
Accept 'Illegal selection. Please enter again ' to MSEL
Store F to validd1
ENDCASE
If sreport
?
? ' Property Report ',tname,' ',curdate
?
? 'record status name type location used by value'
? '----- ------ ------------- --------- ---------- ---------- ----------'
Do while (.not. (&bname)) .and. (.not. EOF)
SKIP
enddo
Do while &bname .and. .not. EOF
? str(#,5),status,$(iname,1,15),$(itype,1,10),$(ilocation,1,10)
?? used:by,'$',ivalue
SKIP
Do while .not. (&BNAME) .and. .not. EOF
SKIP
enddo
enddo
?
Accept 'Report is complete. Press <RETURN>' to xx
endif
endif
ENDDO
If MSEL<>'9'
Restore from FMEMVARS
endif
ENDDO
RETURN
4 êCδ╙╞ CδÑá╨**tè<t
└t Cδ∞╞ Cδ│╞ Jç┌èç┌ê╟Jç┌èç┌ê├è
└u■═Z2└ç┌êç┌BêΦç┌êç┌
└├è< t< uCδ≤├è<'t
<"t2└ó╨*├╞ Có╨*├ ║Rç┌èC:t■└KêC└╢ ê┬┌èCè7ç┌Z2└├∙Z├î╚Φë┬Ä└╛Ç ë≈èÇ 2φAⁿ≥ñÄ┌î╪Ä╨╝/î╚Ä╪║≥!░#┤%═!ΦD╗ ë«ëáë░ëUΦ Θú║:Φ╫÷║@Φ╤÷Θ$╗ë║] ΦÜ⌠Φq≈■└ó┬ó\ ╗ ëê╪ó ╗Ç áê
└èCS■└╪Ç╫ ╞ [║Φc■Φ< rç╙╗·ΦÅ≤sΦ╢ δ∞ë┘Cï π║ ïFC╞ KΦ─≤ç╙ëFt├╗ ëF├ç┘è